import React, { Component, Suspense } from "react";
import { connect } from "dva";
import EditQa from "@/pages/KnowledgeManagement/Overview/editQa";
import { FormattedMessage } from "umi-plugin-react/locale";
import back from "@/assets/icons/back.png";
import styles from "./backRouter.less";
import { Form, Button, Modal, Icon, Spin, Card, Pagination, Drawer } from "antd";
import { routerRedux } from "dva/router";
import noData from "@/assets/icons/暂无数据.png";
import { formatMessage } from "umi-plugin-react/locale";
const FormItem = Form.Item;
export class BackRoutr extends Component {
  state = {};

  componentDidMount() {}

  backRouter = () => {
    const { dispatch, listPage } = this.props;
    dispatch(routerRedux.push({ pathname: this.props.pathname, query: { page: listPage } }));
  };

  render() {
    return (
      <div onClick={this.backRouter} className={styles.backBJ}>
        <img src={back} />
        <div style={{ fontSize: 13, color: "#333", marginLeft: 5, paddingBottom: 1 }}>{formatMessage({ id: "button.back" })}</div>
      </div>
    );
  }
}

export default connect(({ user }) => ({
  currentUser: user.currentUser,
}))(Form.create()(BackRoutr));
